Method to Calculate Velocity